1. Field of the Invention
The present invention relates to a storage device and a method of accessing a status thereof. In particular, the present invention relates to a storage device comprising a non-volatile memory which uses a device data structure field to record status information.
2. Descriptions of the Related Art
Non-volatile memories are classified into read only memories (ROMs) and flash memories depending on whether they allow data stored therein to be randomly rewritten. Flash memories, which are widely used in various electronic apparatuses such as mobile phones, digital cameras, MP3 players and the like, have many advantages. Nonetheless, flash memories are also known to have an unfavorable electrical characteristic. That is, the hardware thereof can be erased only a certain number of times. Typically, a flash memory with single level cells (SLC) can be erased one hundred thousand times, while those with multiple level cells (MLC) can be erased only ten thousand times. Moreover, bad blocks, which cannot be written to, often result from normal use, and once all the spare blocks become bad, it becomes difficult to write data into the flash memory.
Currently, there are disc drives that adopt flash memories as the storage unit. After using these drives for a long period of time, there will be an increased susceptibility to damage because of the increased read/write times. Accordingly, there is a need to report the status of the disc drive to an operating system and associated applications when an abnormal status arises or the disc drive is coming to the end of its service life. The user can then replace the disk drive or make a backup copy of the data before the disc drive fails, thereby ensuring safety of the data.
Technologies for reporting the status information of a disc drive using a flash memory as the storage unit have not been proposed yet in the prior art. The practice currently adopted to manage flash memories is to store status information thereof into a controller chip within the flash memory, which is inaccessible to common operating systems and associated monitoring applications. Consequently, such status information of the flash memory can only be accessed by means of the applications supplied by the manufacturer thereof. However, because controller chips from different manufactures vary from each other, an application from one manufacture is incompatible with memory controller chips from other manufacturers.
As a result, it is important to provide a mechanism for reporting the status information of such a disc drive to an operating system and monitoring applications thereof to ensure the safety of data stored therein.